/*
 *  Copyright 2020-2025 the original author or authors.
 *  You cannot use this file unless authorized by the author.
 */

package org.ipig.search.es.parm;

import lombok.Data;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.search.aggregations.AggregationBuilder;
import org.elasticsearch.search.sort.SortBuilder;

import java.io.Serializable;

/**
 * 检索参数
 * <li>包括查询、聚合、排序
 *
 * @author <a href="mailto:comchnts@163.com">chinats</a>
 * @version $$Id$$
 * @since 1.0
 */
@Data
public class SearchParm implements Serializable {
    /** 索引名 */
    private String indexName;
    /** 索引类型 */
    private String typeName;
    /** 文档ID */
    private String docId;
    /** 查询Builder */
    private QueryBuilder queryBuilder;
    /** 聚合Builder */
    private AggregationBuilder aggsBuilder;
    /** 排序Builder */
    private SortBuilder<?> sortBuilder;
    /** 大小 */
    int size = 10;
    /** 开始位置 */
    int from = 0;
}
